import { IGaeaSetting } from '../../../defines/application';

export class Props {
  public editSetting: IGaeaSetting = {
    key: 'gaea-laber-outsider-detail',
    name: 'LaberOutSiderDetail',
    grouping: 'otherType',
    isContainer: true,
    collectType: 1,
    childrenContainer: 'detailbody',
    childExpressWay: 'template',
    editors: [
      {
        field: 'name',
        text: 'Label',
        type: 'string',
        specialType: 'title'
      },
      // {
      //   field: 'actionName',
      //   text: 'ActionName',
      //   type: 'string',
      // },
      {
        field: 'layout',
        type: 'radio',
        text: 'Layout',
        data: [
          { text: '列表', value: 'list' },
          { text: '表格', value: 'table' }
        ]
      },
      // 高级设置
      {
        group: 'Advanced', // 分组 --- 高级设置 or 基础设置(默认)
        field: 'visibleConditions',
        text: 'Condition',
        type: 'Condition'
      }
    ]
  };
  public form: any;
  public className = '';
  public name = '明细';
  public childTemplate?: string;
  public value?: any;
  public code?: string;
  public layout: 'list' | 'table' = 'list';
  public actionName = '增加明细';
  public hideAddBtn = false;
  public hideDelBtn?: boolean = false;
  public renderMode?: FormRenderModes;
  public explainText?: string;
  public onContentChange?: (params: any) => void;
  public formValues?: any;
  public disabled?: boolean = false;
  public preSelectStandard?: { text: string; value: number };
  public onChange?: (params: any) => void;
  public matterId: string;
  public matterTotal?: number;
  public matterTotalUseAble?: number;
  public matterName?: string;
  public uuid?: string;
  public authorizeAmountUsable?: number;
  public projectName: string;
}
export type IMode = 'detail' | 'edit';
export class State {
  showAddModal: boolean;
  showDetailModal: boolean;
  values: any;
  ids: any;
  editIndex: number | undefined;
  editId: string | undefined;
  // amountReport: number;
  showImportResult: any
  delReport: boolean;
  uuid: string;
  // provideList: any[];
  detailMode: number | undefined; // 明细列表模式（1-导入 2-人工录入 undefined-全部）
  currentCostTypes: string[];
}
